import request from '@/utils/request'

export function login(data) {

    return request({
        url: '/web/login',
        method: 'post',
        data
    })
}

export function loginAgent(data) {
    return request({
        url: '/agent/login',
        method: 'post',
        data
    })
}

export function loginStore(data) {
    return request({
        url: '/store/login',
        method: 'post',
        data
    })
}

export function getInfo(token) {
    return request({
        url: '/user/info',
        method: 'get',
        params: {token}
    })
}

export function logout() {
    return request({
        url: '/user/logout',
        method: 'post'
    })
}

export function register() {
    return request({
        url: 'agent/register',
        method: 'post'
    })
}
